package test.com.sms.selenium.sms.resourcemanagement.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class RmAddCompanyAddRatePageUtil extends SeleniumPageUtil{
	public final static By ADRATE_BUTTON_CONTINUE = By.xpath("//*[@id='resourceBillingRate']/div[1]/div[2]");
	public final static By ADRATE_BUTTON_CLEAR = By.xpath("//*[@id='resourceBillingRate']/div[1]/input");
	public final static By ADRATE_BUTTON_CLOSE = By.id("rateDialogClose");
	
	public final static By ADRATE_LABEL_BILLING_RATE_STATUS = By.xpath("//*[@id='resourceBillingRate']/div[3]/div[1]/div[1]/label");
	public final static By ADRATE_SELECT_BILLING_RATE_STATUS = By.id("billingRateStatusCode");
	public final static By ADRATE_LABEL_RATE_BASIS = By.xpath("//*[@id='resourceBillingRate']/div[3]/div[1]/div[2]/label");
	public final static By ADRATE_SELECT_RATE_BASIS = By.id("rbrPayTypeCode");
	public final static By ADRATE_LABEL_SLA_TYPE = By.xpath("//*[@id='resourceBillingRate']/div[3]/div[1]/div[3]/label");
	public final static By ADRATE_SELECT_SLA_TYPE = By.id("rbrSlaCode");
	public final static By ADRATE_LABEL_SKILL_SET_GROUP = By.xpath("//*[@id='resourceBillingRate']/div[3]/div[1]/div[4]/label");
	public final static By ADRATE_SELECT_SKILL_SET_GROUP = By.id("abstractSkillSetGroupRate");
	public final static By ADRATE_LABEL_SPECIAL_REQ = By.xpath("//*[@id='resourceBillingRate']/div[3]/div[1]/div[5]/label");
	public final static By ADRATE_SELECT_SPECIAL_REQ = By.id("rbrSpecialRequirementCode");
	public final static By ADRATE_LABEL_DISTANCE = By.xpath("//*[@id='resourceBillingRate']/div[3]/div[2]/div[1]/label");
	public final static By ADRATE_SELECT_DISTANCE = By.id("rbrDistanceCode");
	public final static By ADRATE_LABEL_SERVICE_TYPE = By.xpath("//*[@id='resourceBillingRate']/div[3]/div[2]/div[2]/label");
	public final static By ADRATE_SELECT_SERVICE_TYPE = By.id("serviceTypeCode");
	public final static By ADRATE_LABEL_AMOUNT = By.xpath("//*[@id='resourceBillingRate']/div[3]/div[2]/div[3]/label");
	public final static By ADRATE_INPUT_AMOUNT = By.id("amount");
	public final static By ADRATE_LABEL_CURRENCY = By.xpath("//*[@id='resourceBillingRate']/div[3]/div[2]/div[4]/label");
	public final static By ADRATE_SELECT_CURRENCY = By.id("currencyCode");
	
	public static void waitForAddCompanyRatePageToLoad(){
		SeleniumUtil.waitOnElements(new By[]{
				ADRATE_BUTTON_CONTINUE, ADRATE_BUTTON_CLEAR, ADRATE_BUTTON_CLOSE, ADRATE_SELECT_BILLING_RATE_STATUS, 
				ADRATE_SELECT_RATE_BASIS, ADRATE_INPUT_AMOUNT, ADRATE_SELECT_CURRENCY, 
		});
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ADRATE_BUTTON_CONTINUE)));
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ADRATE_BUTTON_CLEAR)));
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ADRATE_BUTTON_CLOSE)));
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ADRATE_SELECT_BILLING_RATE_STATUS)));
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ADRATE_SELECT_RATE_BASIS)));
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ADRATE_INPUT_AMOUNT)));
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ADRATE_SELECT_CURRENCY)));
	}
}
